"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Person = /** @class */ (function () {
    function Person(name, age) {
        this.username = name;
        this.age = age;
    }
    Person.prototype.say = function () {
        console.log('类内部', this.username);
    };
    return Person;
}());
var Student = /** @class */ (function (_super) {
    __extends(Student, _super);
    function Student(name, age) {
        return _super.call(this, name, age) || this;
    }
    Student.prototype.learn = function () {
        console.log('子类---', this.username);
    };
    return Student;
}(Person));
var p1 = new Person('lili', 18);
// console.log("===",p1.username)
p1.say();
var s1 = new Student('zs', 10);
s1.learn();
//修饰符
//公共  public  在类内核子类和实例都可以访问
//受保护 protected  只能在类内核子类使用，在实例无法访问
//私有  private 只能在类内访问，在子类和实例上都不可以访问
